<!DOCTYPE html>
<html ng-app="ionicApp">
<head>

  <meta charset="utf-8">
  <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width">

  <title>Ionic Toggles</title>

  <link href="http://code.ionicframework.com/nightly/css/ionic.min.css" rel="stylesheet">
  <link href="style.css" rel="stylesheet">

  <script src="http://code.ionicframework.com/nightly/js/ionic.bundle.min.js"></script>
  <script src="script.js"></script>

</head>

<body ng-controller="MainCtrl">

  <ion-header-bar class="bar-positive">
    <h1 class="title">Toggles</h1>
  </ion-header-bar>

  <ion-content>

    <div class="list">

      <div class="item item-divider">
        Settings
      </div>

      <ion-toggle ng-repeat="item in settingsList" ng-model="item.checked" ng-checked="item.checked">
        {{ item.text }}
      </ion-toggle>

      <div class="item">
        <pre ng-bind="settingsList | json"></pre>
      </div>

      <div class="item item-divider">
        Notifications
      </div>

      <ion-toggle ng-model="pushNotification.checked" ng-change="pushNotificationChange()">
        Push Notifications
      </ion-toggle>

      <div class="item">
        <pre ng-bind="pushNotification | json"></pre>
      </div>

      <ion-toggle ng-model="emailNotification" ng-true-value="Subscribed" ng-false-value="Unubscribed">
        Newsletter
      </ion-toggle>

      <div class="item">
        <pre ng-bind="emailNotification | json"></pre>
      </div>

    </div>

  </ion-content>

</body>
</html>
